﻿using System;

namespace OWASP.CodeReview.CodeCrawler.Engine.Configuration {

    /// <summary>
    /// Create a Settings Control Object to send in parallel with a codeScan() object;
    /// </summary>
    internal class SettingsControl {
        /// <summary>
        /// Settings Object
        /// </summary>
        protected internal struct Settings {

            public bool _enableCritical                         { get; set; }
            public bool _enableAlert                            { get; set; }
            public bool _enableMedium                           { get; set; }
            public bool _enableTechnical                        { get; set; }
            public bool _enableLow                              { get; set; }
            public bool _extendServerScan                       { get; set; }
            public ServerCrawlerSettings crawlerServerSetttings { get; set; }}

        /// <summary>
        /// Assumption: We got the rights
        /// </summary>
        protected internal struct ServerCrawlerSettings {

            public string _machineName                          { get; set; }
            public string _machineFolder                        { get; set; }}

        /// <summary>
        /// SettingsControl Container
        /// </summary>
        protected internal SettingsControl() {

            Settings _settings = new Settings();
            
            _settings._enableCritical     = true;            // by default
            _settings._enableAlert        = true;            // by default
            _settings._enableMedium       = false;
            _settings._enableTechnical    = false;
            _settings._enableLow          = false;

            ServerCrawlerSettings crawlerServerSettings = new ServerCrawlerSettings();
                                  crawlerServerSettings._machineFolder = string.Empty;
                                  crawlerServerSettings._machineFolder = string.Empty;

            _settings.crawlerServerSetttings = crawlerServerSettings;}
    }
}
